Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iterator on empty map #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix iterator on empty map #8

wants to merge 1 commit into from

Conversation

Dllieu
Copy link

@Dllieu Dllieu commented Oct 17, 2017

No description provided.

@smessmer
Copy link

smessmer commented Feb 7, 2019

This is actually unreachable code since the loop never exits if it doesn't call its return. Not saying I have a good understanding of if the current version of the code handles empty maps correctly or not though. My guess would be a sentinel element that ensures it always finds an element that has has_value()==true and returns?

facebook-github-bot pushed a commit to pytorch/pytorch that referenced this pull request Feb 11, 2019
Summary:
Pull Request resolved: #16907

The begin()/end() fix actually doesn't make sense, see my comment on skarupke/flat_hash_map#8
This diff removes it.

Reviewed By: ezyang

Differential Revision: D13985779

fbshipit-source-id: f08b02c941069e2a4e728e02a19b65dc72f96b41
pearu pushed a commit to Quansight/pytorch that referenced this pull request Feb 12, 2019
Summary:
Pull Request resolved: pytorch#16907

The begin()/end() fix actually doesn't make sense, see my comment on skarupke/flat_hash_map#8
This diff removes it.

Reviewed By: ezyang

Differential Revision: D13985779

fbshipit-source-id: f08b02c941069e2a4e728e02a19b65dc72f96b41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants